<template>
  <view>
    <item
      v-for="item in data"
      :car="item"
      :key="item.carshop_car_id"
      @tap="toDetail"
    />
  </view>
</template>

<script>
import item from '@components/business/resource/index/item'
import { navigateTo } from '@utils/index'

export default {
  name: 'SelfList',
  components: {
    item
  },
  props: {
    data: {
      type: Array,
      default: () => []
    }
  },
  data() {
    return {}
  },
  methods: {
    toDetail(e) {
      navigateTo('business/resource/detail', {
        carshop_car_id: e.carshop_car_id
      })
    }
  }
}
</script>

<style>
.main {
  padding: 0.8rem;
}
</style>
